//
//  CCTextField.swift
//  EPHome
//
//  Created by liujianlong on 2022/8/25.
//

import UIKit

@objc open class CCTextField: UITextField {
    
    open override func leftViewRect(forBounds bounds: CGRect) -> CGRect {
        var iconrect = super.leftViewRect(forBounds: bounds)
        iconrect.origin.x += 15
        return iconrect
    }
    
    open  override func textRect(forBounds bounds: CGRect) -> CGRect {
        let w = self.leftView?.bounds.width ?? 0
        return CGRect(origin: CGPoint(x: w + 30, y: 0), size: bounds.size)
    }
    open override func editingRect(forBounds bounds: CGRect) -> CGRect {
        let w = self.leftView?.bounds.width ?? 0
        return CGRect(origin: CGPoint(x:  w + 30, y: 0), size: bounds.size)
    }
    
}
